package com.example.hotelsystem.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author Lee
 * @since 2020-10-13
 */
@ApiModel(value="User对象", description="")
@Data
public class User implements Serializable {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "用户id")
    @Excel(name = "用户id", orderNum = "0")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户名")
    @Excel(name = "用户名", orderNum = "1")
    private String username;

    @ApiModelProperty(value = "密码")
    @Excel(name = "密码", orderNum = "12")
    private String password;

    @ApiModelProperty(value = "注册时间")
    @DateTimeFormat(pattern = "yyyyMMdd")
    @JsonFormat(pattern = "yyyyMMdd")
    @Excel(name = "注册时间", orderNum = "2")
    private Date createTime;

    @ApiModelProperty(value = "邮箱")
    @Excel(name = "邮箱", orderNum = "3")
    private String email;

    @ApiModelProperty(value = "联系方式")
    @Excel(name = "联系方式", orderNum = "4")
    private String phone;

    @ApiModelProperty(value = "身份证号码")
    @Excel(name = "身份证号码", orderNum = "5")
    private String idcard;

    @TableField(exist = false)
    private Long roleId;


    @TableField(exist = false)
    @Excel(name = "担当角色", orderNum = "6")
    private Object role;

    @ApiModelProperty(value = "年龄")
    @Excel(name = "年龄", orderNum = "7")
    private Integer age;

    @ApiModelProperty(value = "头像")
    @Excel(name = "头像", orderNum = "8")
    private String avatar;

    @ApiModelProperty(value = "性别")
    private Integer sex;

    @TableField(exist = false)
    @ApiModelProperty(value = "性别解释")
    @Excel(name = "性别", orderNum = "9")
    private String sexText;

    @ApiModelProperty(value = "生日")
    @JsonFormat(pattern = "yyyyMMdd")
    @DateTimeFormat(pattern = "yyyyMMdd")
    @Excel(name = "生日", orderNum = "10")
    private Date birthday;

    @ApiModelProperty(value = "工作职业")
    @Excel(name = "工作职业", orderNum = "11")
    private String occupation;

    @ApiModelProperty(value = "逻辑删除")
    private Integer isDelete;
}
